<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../template/common.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="title">
        Exam list
    </ui:define>

    <ui:define name="head">
        <script src="../../res/js/jquery-1.10.2.min.js"></script>
        <script src="../../res/js/jquery-ui-1.10.0.custom.js"></script>
        <script>
            $(function() {
                $(document).tooltip();
            });
        </script>
        <style>
            label {
                display: inline-block;
                width: 100px;
            }
        </style>
          <link rel="stylesheet" href="../../res/css/admin-style.css"/>
    </ui:define>

    <ui:define name="pageheader">
        Exam list    
    </ui:define>

    <ui:define name="content">
        <h:form id="mainform">

            <h:dataTable styleClass="main-table" value="#{examResultManager.listExamResult}" 
                         var="e" width="100%" cellpadding="0" border="0" id="product-table">
               
                <h:column headerClass="table-header-repeat line-left minwidth-1">
                    <f:facet name="header">
                        <h:commandLink value="Student ID" />
                    </f:facet>
                    #{e.students.studentId}
                </h:column>
                <h:column headerClass="table-header-repeat line-left minwidth-1">
                    <f:facet name="header">
                        <h:commandLink value="Student name" />
                    </f:facet>
                    #{e.students.accounts.fullName}
                </h:column>
                <h:column headerClass="table-header-repeat line-left minwidth-1">
                    <f:facet name="header">
                        <h:commandLink value="Student birthday" />
                    </f:facet>
                    <h:outputText value=" #{e.students.accounts.birthday}">
                        <f:convertDateTime timeZone="GMT+7" pattern="dd-MM-yyyy" >
                           

                        </f:convertDateTime>
                    </h:outputText>
                </h:column>
                <h:column headerClass="table-header-repeat line-left minwidth-1">
                    <f:facet name="header">
                        <h:commandLink value="Mark" />
                    </f:facet>
                    <h:inputText value="#{e.mark}" />
                </h:column>
            

            </h:dataTable>
           
            <h:commandButton value="Update"  action="#{examResultManager.updateAll}" class="buttons"/>
            <p:growl id="g1"  />
        </h:form>

    </ui:define>

</ui:composition>
